﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ATFCodeCS
{
	public class Text
	{
		public StringBuilder Data { get; set; }
		public Text()
		{
			Data = new StringBuilder();
		}
		public Text(string str)
		{
			Data = new StringBuilder(str);
		}
		public void DefaultFormat()
		{
			string _2tab = string.Format("{0}{1}", Define.TAB.ToString(), Define.TAB.ToString());
			string _1tab = string.Format("{0}", Define.TAB.ToString());
			string _2space = string.Format("{0}{1}", Define.SPACE.ToString(), Define.SPACE.ToString());
			string _1space = string.Format("{0}", Define.SPACE.ToString());
			string _2EndLine = string.Format("{0}{1}", Define.CRLF.ToString(), Define.CRLF.ToString());
			string _1EndLine = string.Format("{0}", Define.CRLF.ToString());
			string _EndTab = string.Format("{0}{1}", Define.CRLF.ToString(), Define.TAB.ToString());
			string _ENDSpace = string.Format("{0}{1}", Define.CRLF.ToString(), Define.SPACE.ToString());

			for (int i = 0; i < 30; i++)
			{
				Data = Data.Replace(_2tab, _1tab);
				Data = Data.Replace(_2EndLine, _1EndLine);
				Data = Data.Replace(_2space, _1space);
				Data = Data.Replace(_EndTab, _1EndLine);
				Data = Data.Replace(_ENDSpace, _1EndLine);
			}

		}
		private bool soSanh(string nguon, string dich)
		{
			return nguon.Equals(dich);
		}
	}
}
